package edu.npu.cv.constant;

/**
 * @ClassName ResultCode
 * @Description TODO
 * @Author Quentin_zyj
 * @Date 2021/10/5 18:24
 */
public class ResultCode {

    /**
     * 成功
     */
    public static final int SUCCESS = 1;
    public static final String MSG_SUCCESS = "success";

    // 业务中细分的code 1000-1999
    /**
     * 账号或密码错误
     */
    public static final int ERROR_ACCOUNT_OR_PASSWORD = 1000;
    public static final String MSG_ERROR_ACCOUNT_OR_PASSWORD = "error account or password";

    public static final int ADMIN_NOT_SIGN_IN = 1001;
    public static final String MSG_ADMIN_NOT_SIGN_IN = "admin does not sign in";

    public static final int ADMIN_NOT_EXIST = 1002;
    public static final String MSG_ADMIN_NOT_EXIST = "admin does not exist";

    /**
     * 数据库错误
     */
    public static final int DB_ERROR = 9000;
    public static final String MSG_DB_ERROR = "db error";

    /**
     * 参数非法
     */
    public static final int PARAMETER_INVALID = 9001;
    public static final String MSG_PARAMETER_INVALID = "parameter invalid";

    /**
     * 请求非法
     */
    public static final int REQUEST_INVALID = 9002;
    public static final String MSG_REQUEST_INVALID = "request invalid";

    /**
     * 系统错误
     */
    public static final int ERROR_SYSTEM_EXCEPTION = 9999;
    public static final String MSG_ERROR_SYSTEM_EXCEPTION = "system error";

}
